
package eSchool.GUI.Components;


public class panDesktop extends javax.swing.JPanel {
    
    public panDesktop() {
        initComponents();
    }
   
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        cardInicial = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        cardAlunos = new eSchool.GUI.Controls.panTabFicha();
        cardFuncionarios = new eSchool.GUI.Controls.panTabFicha();
        cardDocentes = new eSchool.GUI.Controls.panTabFicha();
        cardDisciplinas = new eSchool.GUI.Controls.panDisciplinas();
        cardUtilizadores = new eSchool.GUI.Controls.panTabUtilizador();

        setLayout(new java.awt.CardLayout());

        jLabel1.setFont(new java.awt.Font("Tahoma", 3, 48)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 0, 102));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("OS ILUMINADOS"); // NOI18N
        jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153)));

        javax.swing.GroupLayout cardInicialLayout = new javax.swing.GroupLayout(cardInicial);
        cardInicial.setLayout(cardInicialLayout);
        cardInicialLayout.setHorizontalGroup(
            cardInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(cardInicialLayout.createSequentialGroup()
                .addGap(685, 685, 685)
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        cardInicialLayout.setVerticalGroup(
            cardInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
        );

        add(cardInicial, "cardInicial");
        add(cardAlunos, "cardAlunos");
        add(cardFuncionarios, "cardFuncionarios");
        add(cardDocentes, "cardDocentes");
        add(cardDisciplinas, "cardDisciplinas");
        add(cardUtilizadores, "cardUtilizadores");
    }// </editor-fold>//GEN-END:initComponents
    
    public void setModo(int modo, String nomeMenu){
        
        if(nomeMenu.equals("NovoAluno") || nomeMenu.equals("ListaAlunos")){
            cardAlunos.setSelectedTab(modo);
            cardAlunos.setObjectoTrabalho(new UIConectorAluno());
        }
        if(nomeMenu.equals("NovoDocente") || nomeMenu.equals("ListaDocentes")){
            cardDocentes.setSelectedTab(modo);
            cardDocentes.setObjectoTrabalho(new UIConectorDocente());
        }
        if(nomeMenu.equals("NovoFuncionario") || nomeMenu.equals("ListaFuncionarios")){
            cardFuncionarios.setSelectedTab(modo);
            cardFuncionarios.setObjectoTrabalho(new UIConectorFuncionario());
        }
        
        if(nomeMenu.equals("NovaDisciplina") || nomeMenu.equals("ListaDisciplinas")){
            cardDisciplinas.setSelectedTab(modo);
            cardDisciplinas.setObjectoTrabalho(new UIConectorDisciplina());
        }
    }
    
        
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private eSchool.GUI.Controls.panTabFicha cardAlunos;
    private eSchool.GUI.Controls.panDisciplinas cardDisciplinas;
    private eSchool.GUI.Controls.panTabFicha cardDocentes;
    private eSchool.GUI.Controls.panTabFicha cardFuncionarios;
    private javax.swing.JPanel cardInicial;
    private eSchool.GUI.Controls.panTabUtilizador cardUtilizadores;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
    
}
